//
//  WPPEFThirdTableViewCell.m
//  wobingwoyi
//
//  Created by WGP on 2017/3/2.
//  Copyright © 2017年 WGP. All rights reserved.
//

#import "WPPEFThirdTableViewCell.h"

@interface WPPEFThirdTableViewCell ()

@end
@implementation WPPEFThirdTableViewCell

-(instancetype)initWithStyle:(UITableViewCellStyle)style reuseIdentifier:(NSString *)reuseIdentifier
{
    if (self = [super initWithStyle:style reuseIdentifier:reuseIdentifier])
    {
        self.contentView.backgroundColor = [UIColor whiteColor];
        self.selectionStyle = UITableViewCellSelectionStyleNone;
        
        self.layout = [[LxGridViewFlowLayout alloc] init];
        self.collectionView = [[UICollectionView alloc] initWithFrame:CGRectZero collectionViewLayout:self.layout];
        [self.contentView addSubview:self.collectionView];
        [self.collectionView mas_makeConstraints:^(MASConstraintMaker *make) {
            make.top.equalTo(self.contentView).offset(15);
            make.bottom.equalTo(self.contentView).offset(-15);
            make.left.equalTo(self.contentView).offset(10);
            make.right.equalTo(self.contentView).offset(-10);
        }];
        
        CGFloat width = (SCREEN_WIDTH - 5*10)/4.0;
        self.layout.itemSize = CGSizeMake(width, width);
        self.layout.minimumLineSpacing = 10;
        self.layout.minimumInteritemSpacing = 10;
        self.collectionView.showsVerticalScrollIndicator = NO;
    }
    return self;
}
@end
